package com.learning.Map;

public class CartItem {
    //购物项类
    private Goods goods;
    private int quantity;
    private double subTotal;

    @Override
    public String toString() {
        return "CartItem{" +
                "goods=" + goods +
                ", quantity=" + quantity +
                ", subTotal=" + subTotal +
                '}';
    }

    public CartItem() {
    }

    public CartItem(Goods goods, int quantity, double subTotal) {
        this.goods = goods;
        this.quantity = quantity;
        this.subTotal = subTotal;
    }

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public double getSubTotal() {
        return subTotal;
    }

    public void setSubTotal(double subTotal) {
        this.subTotal = subTotal;
    }
}
